package inherit;

class Animal {
    public String name;
    public int age;

    public void eat() {
        System.out.println(name + "在吃饭！");
    }
}

class Dog extends Animal {
    public void barks() {
        System.out.println(name + "汪汪叫！");
    }
}

class Cat extends Animal {
    public void catchMouse() {
        System.out.println(name + "正在抓老鼠！");
    }
}

public class Test1 {
    public static void main(String[] args) {

    }
}
